import { ToolTipItem } from "../../../../com/mui/manager/ToolTipItem";
import { LoaderHelp } from "../../../common/display/LoaderHelp";
import { ResFileConst } from "../../resource/ResFileConst";
import { EVIPType } from "../../../../Message/Public/EVIPType";
import { Language } from "../../../../extend/language/Language";
import { GlobalClass } from "../../../../com/mui/core/GlobalClass";
import { ImagesConst } from "../../resource/ImagesConst";
type int = number;
//class GuildVipItem
    
    export  class GuildVipItem extends ToolTipItem
    {
        constructor()
        {
            super();
            this._vipBitmap = new Object /* flash.display.Bitmap */();
            this.addChild(this._vipBitmap);
            return;
        }

        public get vip(): int
        {
            return this._vip;
        }

        public set vip(arg1: int)
        {
            this._vip = arg1;
            LoaderHelp.addResCallBack(ResFileConst.guildVip, this.onUpdateVipHandler);
            return;
        }

        /* internal  */onUpdateVipHandler(): void
        {
            if (this._vip != EVIPType._EVIPTypeHalfYear) 
            {
                if (this._vip != EVIPType._EVIPTypeMonth) 
                {
                    if (this._vip != EVIPType._EVIPTypeWeek) 
                    {
                        this._vipBitmap.bitmapData = null;
                        this._tip = Language.getString(30085);
                    }
                    else 
                    {
                        this._vipBitmap.bitmapData = GlobalClass.getBitmapData(ImagesConst.GuildVip3);
                        this._tip = Language.getString(30086);
                    }
                }
                else 
                {
                    this._vipBitmap.bitmapData = GlobalClass.getBitmapData(ImagesConst.GuildVip2);
                    this._tip = Language.getString(30087);
                }
            }
            else 
            {
                this._vipBitmap.bitmapData = GlobalClass.getBitmapData(ImagesConst.GuildVip1);
                this._tip = Language.getString(30088);
            }
            this._tip = this._tip + "VIP";
            this.toolTipData = "<font color=\'#f0ea3f\'>" + this._tip + "</font>";
            return;
        }

        /* internal */ /* var */_vip: int;

        /* internal */ /* var */_vipBitmap: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_tip: string;
    }
